#!/bin/bash

DIRNAME=$1/img/
IMG=$2
Green=$'\e[1;32m'
Normal=$'\e[0m'
Blue=$'\e[1;34m'

read -a array < ../../../dk/ver

VER=${array[0]}

NEWFILE=$DIRNAME/$IMG-$VER.tar

echo -e "...................................export $Blue $IMG$Green:$VER $Normal\t\tto $NEWFILE"
docker save $IMG:$VER -o $NEWFILE
gzip $NEWFILE
